package scalapackage.scalamatch

import scala.util.Random


/**
  * Created by Germmy on 2018/3/30.
  */
object StringMatch {


  def main(args: Array[String]) {



    val arr = Array("zhoudongyu","zhengshuang","guanxiaotong","yangzi") //啥时候要用:声明类型，啥时候不要？

    var str = arr(Random.nextInt(arr.length))


    str match {
      case "zhoudongyu" => println("周冬雨")
      case "zhengshuang" => println("郑爽")
      case "guanxiaotong" => println("关晓彤")
      case "yangzi" => println("杨紫")
      case _ => println("No Match")
    }
  }


}
